package com.rc.saas.tenant.service.hlhtsk;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.rc.saas.tenant.base.BaseSearch;
import com.rc.saas.tenant.mapper.hlhtsk.HlhtskGovtTenantOperatorMapper;
import com.rc.saas.tenant.model.hlhtsk.HlhtskGovtTenantOperator;
import com.rc.saas.tenant.model.hlhtsk.HlhtskGovtTenantOperatorExample;
import com.rc.saas.tenant.vo.hlht.HlhtskGovtTenantOperatorAndTenantOperatorName;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author frog
 * @date 2021/4/20
 */
@Service
public class HlhtskGovtTenantOperatorServiceImpl implements  HlhtskGovtTenantOperatorService{

    @Autowired
    private HlhtskGovtTenantOperatorMapper hlhtskGovtTenantOperatorMapper;

    @Override
    public HlhtskGovtTenantOperatorMapper getMapper() {
        return hlhtskGovtTenantOperatorMapper;
    }

    @Override
    public PageInfo<HlhtskGovtTenantOperator> listPageHlhtskGovtTenantOperator(BaseSearch baseSearch) {
        PageHelper.startPage(baseSearch.getOffset(), baseSearch.getLimit());
        HlhtskGovtTenantOperatorExample example = new HlhtskGovtTenantOperatorExample();
        List<HlhtskGovtTenantOperator> hlhtskGovtTenantOperators = hlhtskGovtTenantOperatorMapper.selectByExample(example);
        return new PageInfo<HlhtskGovtTenantOperator>(hlhtskGovtTenantOperators);
    }



    @Override
    public List<HlhtskGovtTenantOperatorAndTenantOperatorName> queryHlhtskGovtTenantOperatorAndTenantOperatorName(HlhtskGovtTenantOperatorAndTenantOperatorName hlhtskGovtTenantOperatorAndTenantOperatorName) {
        return hlhtskGovtTenantOperatorMapper.queryHlhtskGovtTenantOperatorAndTenantOperatorName(hlhtskGovtTenantOperatorAndTenantOperatorName);
    }
}
